import type { TableColumn } from '@/components/core/dynamic-table';

export type TableListItem = API.SiteListPageResultItem;
export type TableColumnItem = TableColumn<TableListItem>;

export const baseColumns: TableColumnItem[] = [
  {
    title: '关键词',
    dataIndex: 'keyword',
    hideInTable: true,
    searchField: 'keyword',
    formItemProps: {
      labelWidth: 55,
      componentProps: () => {
        return {
          placeholder: '可输入场所名称、地址搜索',
          autocomplete: 'off',
          disabledLabelWidth: true,
        };
      },
    },
  },
  {
    title: '单位名称',
    width: 120,
    dataIndex: 'placeName',
    hideInSearch: true,
  },
  {
    title: '注册地址',
    dataIndex: 'registerAddress',
    width: 180,
    hideInSearch: true,
  },
  {
    title: '单位联系方式',
    width: 120,
    dataIndex: 'contactsTel',
    hideInSearch: true,
  },
  {
    title: '法人',
    width: 120,
    dataIndex: 'headName',
    hideInSearch: true,
  },
  {
    title: '法人联系方式',
    width: 120,
    dataIndex: 'headTel',
    hideInSearch: true,
  },
  {
    title: '创建时间',
    dataIndex: 'createTime',
    width: 120,
    hideInSearch: true,
  },
];
